package org.biloxi.commands.exceptions;

import org.biloxi.card.Card;
import org.biloxi.commands.Command;

public class CommandOverriddenException extends RuntimeException {
	private static final long serialVersionUID = -3238236151069987376L;
	
	private final Command<?,?> 	_overiddenCommand;
	private final Card			_byWho;
	public CommandOverriddenException(Command<?,?> oc, Card c){
		super(oc.getClass().getSimpleName()+" Command overriden by "+c.getName());
		_overiddenCommand = oc;
		_byWho = c;
	}
	public Command<?, ?> getOveriddenCommand() {
		return _overiddenCommand;
	}
	public Card byWho() {
		return _byWho;
	}
}
